<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Xppass Administrator's Control Panel</title>
<LINK href="<?php echo $www_site_url?>/public/yav-style.css" type=text/css rel=stylesheet>
<script src="<?php echo $www_site_url?>/public/js/common.js" type="text/javascript"></script>
<script src="<?php echo $www_site_url?>/public/js/ajax.js" type="text/javascript"></script>
<script src="<?php echo $www_site_url?>/public/js/PCASClass.js"></script>

<script>
function checkOnSubmit(formName) {
  	return true;
	var url = "<?php echo $www_site_url?>/admin.php";
	var params = mini.form.serialize($(formName));
	
	mini.ajax.post(url, function(r){

		var r = eval('(' + r + ')');   

		if(r.s==200){
			window.location.href = r.d;
		}
		if(r.s==400){
			$('msg').innerHTML = r.m;			
		}
	}, params);
	
	return false;
       
}

</script>
</head>
<body><div id="append"></div>
<div id="msg" style="color:red;text-align:center"></div>
	<div class="container">
	
		<div class="hastabmenu">
				<ul class="tabmenu">
					<li id="addcorporationbtn" class="tabcurrent"><a href="#"><?php echo lang('add_corporation')?></a></li>	
				</ul>
				<div id="addcorporationdiv" class="tabcontentcur" style="width:80%">
					<form id="addcorporationform" name="addcorporationform" action="<?php echo $www_site_url?>/admin.php" method="post" enctype="multipart/form-data" onsubmit="return checkOnSubmit('addcorporationform');" >
					<input type="hidden" name="action" value="corporation">
					<input type="hidden" name="op" value="addcorporation">
				
					<table width="100%">
						<tr>
							<td width="10%"><?php echo lang('c_name')?>:</td>
							<td><input type="text" name="c_name" class="textfield" /> *</td>
						</tr>					
						<tr>
							<td><?php echo lang('pwd')?>:</td>
							<td><input type="text" name="c_password" class="textfield" /> *</td>
							</tr>					
						<tr>
							<td><?php echo lang('c_title')?>:</td>
							<td><input type="text" name="c_title" class="textfield"  style="width:500px;"/><input type="button" value="Split" onclick="document.addcorporationform.c_title.value+='&lt;!--!--&gt;';"></td>
						</tr>		
						<tr>						
				
							<td><?php echo lang('c_initial')?>:</td>
							<td><input type="text" name="c_initial" class="textfield" /></td>
						</tr>
						<tr>
							<td><?php echo lang('c_industry')?>:</td>
							<td><select name="c_industry">
							<option value="0">--</option>
							<?php 
foreach ($GLOBALS['gIndustry'] as $k=>$v){
	?>
							<option value="<?php echo $k;?>"><?php echo lang($v)?></option>
							<?php
}
?>
							</select></td>
						</tr>		
						<tr>
							<td><?php echo lang('c_companytype')?>:</td>
							<td><select name="c_companytype">
							<option value="0">--</option>
<?php 
foreach ($GLOBALS['gCompanytype'] as $k=>$v){
	?>
							<option value="<?php echo $k;?>"><?php echo lang($v)?></option>
<?php
}
?>
							
							</select>
							</td>
						</tr>		
						<tr>
							<td><?php echo lang('c_companycate')?>:</td>
							<td><select name="c_companycate">
							<option value="0">--</option>
<?php 
foreach ($GLOBALS['gCompanycate'] as $k=>$v){
	?>
							<option value="<?php echo $k;?>"><?php echo lang($v)?></option>
<?php
}
?>
							</select>
							</td>
						</tr>
						<tr>
							<td><?php echo lang('c_foodcate')?>:</td>
							<td><select name="c_foodcate">
							<option value="0">--</option>
							<?php 
foreach ($GLOBALS['gFoodcate'] as $k=>$v){
	?>
							<option value="<?php echo $k;?>"><?php echo lang($v)?></option>
<?php
}
?>
							</select>
							</td>
						</tr>	
						<tr>
							<td><?php echo lang('c_companysize')?>:</td>
							<td><select name="c_companysize">
							<option value="0">--</option>
							<?php 
foreach ($GLOBALS['gCompanysize'] as $k=>$v){
	?>
							<option value="<?php echo $k;?>"><?php echo $v?></option>
<?php
}
?>
							
							</select>
							</td>
						</tr>
						<tr>
							<td><?php echo lang('city_district')?>:</td>
							<td>
							<select name="c_province"></select><select name="c_city"></select><select name="c_district"></select>
							</td>
						</tr>	
						<tr>
							<td><?php echo lang('c_companyaddress')?>:</td>
							<td><input type="text" name="c_companyaddress"  class="textfield"/></td>
						</tr>
						
						<tr>
							<td><?php echo lang('c_otherphone')?>:</td>
							<td><input type="text" name="c_otherphone"  class="textfield"/></td>
						</tr>	
						<tr>
							<td><?php echo lang('c_workemail')?>:</td>
							<td><input type="text" name="c_workemail"  class="textfield"/></td>
						</tr>
						<tr>
							<td><?php echo lang('c_website')?>:</td>
							<td><input type="text" name="c_website"  class="textfield"/></td>
						</tr>				
						<tr>
							<td><?php echo lang('c_department')?>:</td>
							<td><input type="text" name="c_department"  class="textfield"/></td>
						</tr>
						<tr>
							<td><?php echo lang('c_contacter')?>:</td>
							<td><input type="text" name="c_contacter"  class="textfield"/></td>
						</tr>					
						<tr>
							<td><?php echo lang('c_phone')?>:</td>
							<td><input type="text" name="c_phone"  class="textfield"/></td>
						</tr>	
						
						
						<tr>
							<td><?php echo lang('c_avgbill')?>:</td>
							<td><input type="text" name="c_avgbill"  class="textfield"/>
							</td>
						</tr>	
											
												
						
											
						<tr>
							<td><?php echo lang('c_intro')?>:</td>
							<td><textarea type="text" name="c_intro" rows="10" style="width:500px" class="textfield"/></textarea></td>
						</tr>
						<tr>
							<td><?php echo lang('c_logo')?>:</td>
							<td><input type="file" name="c_logo" /></td>
						</tr>					
						<tr>
						
							<td colspan="2"><input type="submit" value="<?php echo lang('submit')?>" class="button"/></td>
						</tr>
					</table>
					</form>
	
				</div>
		</div>
</div>
<script>
new PCAS("c_province","c_city","c_district");

</script>
</body>
</html>